import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/home"
  },
  {
    path: "/home",
    name: "Home",
    component: () => import('@/views/home.vue'),
    children: [
      {
        path: "Footer",
        component: () => import('@/components/myfooter.vue')
      },
      {
        path: "mybanner",
        component: () => import('@/components/mybanner.vue')
      },
    ]
  },
  {
    name:"myxihong",
    path:"/myxihong",
    component:() => import('@/components/myxihong.vue')
  },
  {
    name:"myyingyongshui",
    path:"/myyingyongshui",
    component:() => import('@/components/myyingyongshui.vue')
  },
  {
    name:"mylinyu",
    path:"/mylinyu",
    component:() => import('@/components/mylinyu.vue')
  },
  {
    name:"mykongtiao",
    path:"/mykongtiao",
    component:() => import('@/components/mykongtiao.vue')
  },
  {
    name:"mychuifeng",
    path:"/mychuifeng",
    component:() => import('@/components/mychuifeng.vue')
  },
  {
    path: "/order",
    name: "Order",
    component: () => import('@/views/order.vue'),
    children: [
      {
        path: "Footer",
        component: () => import('@/components/myfooter.vue')
      }
    ]
  },
  {
    path: "/mypage",
    name: "myPage",
    component: () => import('@/views/myPage.vue'),
    children: [
      {
        path: "Footer",
        component: () => import('@/components/myfooter.vue')
      }
    ]
  },
  {
    path: "/mylogin",
    name: "myLogin",
    component: () => import('@/mylogin.vue'),
  },
]

const router = new VueRouter({
  routes
})

export default router
